package com.cn.service;

import com.cn.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodsService {
    List<Carousel> carousel();
    List<IndexGoods> NewProductLaunch(int number);

    Goods searchGoodsDetail( int id);
    int addToCart(int userId, int goodsId);

    List<ShoppingCartItem> searchCartInfo(int userId);
    int deleCart( int goodsId);
    int updateCartNum (int num,int goodsId);
    List<Goods> searchGoods(String info);
    List<Category> searchCategory();
    List<Category> searchCategory2();
    List<Goods> searchGoodsByCategory(int categoryId);
    List<OrderItem> searchOrderItem(int userId);


    List<Goods> findAll();
    void updateStatus(int status,int id);
    void updateCarousel(int id);
    List<IndexGoods> findIndexConfig( int id);
    ShoppingCartItem findCartItem(int userId,int goodsId);
    void addNum(int itemId);
    int addCarousel(Carousel carousel);
    int addGoods(Goods goods);
    int editGoods(Goods goods);
    int deleIndexConfigs(int configId);

    IndexGoods findByConfigId(int configId);
    void addIndexGoods(IndexGoods indexGoods);
    void updateIndexGoods(IndexGoods indexGoods);
    Category findCategory( int categoryId);
    void addCategory(Category category);
    void editCategory( Category category);
    void deleCategory( int categoryId);
}
